import {getTask, getTaskDetail, refreshProgress, realoadLocation, pageWardRound, monitor, personImportDeviceStatus} from '@/api/taskApi'
const task = {
    namespaced: true,
    state: {
    },
    getters: {
    },
    mutations: {
    },
    actions: {
        GetTask ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                getTask(params).then(res => {
                    resolve(res)
                })
            })
        },
        // 获取详情
        GetTaskDetail ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                getTaskDetail(params).then(res => {
                    resolve(res)
                })
            })
        },
        RefreshProgress ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                refreshProgress(params).then(res => {
                    resolve(res)
                })
            })
        },
        RealoadLocation ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
            realoadLocation(params).then(res => {
                    resolve(res)
                })
            })
        },
        PageWardRound ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                pageWardRound(params).then(res => {
                    resolve(res)
                })
            })
        },
        Monitor ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                monitor(params).then(res => {
                    resolve(res)
                })
            })
        },
        PersonImportDeviceStatus ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                personImportDeviceStatus(params).then(res => {
                    resolve(res)
                })
            })
        }
    }
}
export default task
